package sqlanalysisgui.view.model.provider;

import org.eclipse.jface.viewers.ArrayContentProvider;
import org.eclipse.zest.core.viewers.IGraphEntityContentProvider;

import sqlanalysisgui.view.model.GraphNode;

public class GraphNodeContentProvider extends ArrayContentProvider implements
		IGraphEntityContentProvider {
	@Override
	public Object[] getConnectedTo(Object entity) {
		if (entity instanceof GraphNode) {
			GraphNode node = (GraphNode) entity;
			return node.getConnectedTo().toArray();
		}
		throw new RuntimeException("Type not supported");
	}
/*	if (parentElement instanceof TableList) {
		TableList tableLists = (TableList) parentElement;
		return tableLists.getCrudInfos().toArray();
	} else if (parentElement instanceof CrudInfo) {
		CrudInfo crudInfos = (CrudInfo) parentElement;
		return crudInfos.getLineInfos().toArray();
	}
	return EMPTY_ARRAY;*/
}
